package com.test.dubbo;


import java.nio.charset.Charset;

public class DubboProtocol
{
    private int len; //关键
    private byte[] content;
    public int getLen() {
        return len;
    }
    public void setLen(int len) {
        this.len = len;
    }
    public byte[] getContent() {
        return content;
    }
    public void setContent(byte[] content) {
        this.content = content;
    }
    public DubboProtocol ()
    {
    }
    public DubboProtocol (String s)
    {
        //获取content的内容，字节数信息
        byte[] con = s.getBytes(Charset.forName("utf-8"));
        int length = s.getBytes(Charset.forName("utf-8")).length;
        this.content = con;
        this.len = length;
    }
}
